<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<title>Dashboard Template for Bootstrap</title>
	<link rel="stylesheet" type="text/css" href="/xiaomi/Public/css/type.css" />
	<script src="/xiaomi/Public/js/jquery.min.js"></script>
</head>
<body class="admin_layout">
<header class="admin_header">
	<h2>小米商城后台管理系统</h2> 
  <ul>
		<li>欢迎您：</li>
		<li><a href="/xiaomi/index.php?s=/Admin/Administrator/modifySellerInformation"><?php echo ($_SESSION['admin_name']); ?>&emsp;</a></li>
		<li>|</li>
		<li><a href="/xiaomi/index.php?s=">&emsp;前台首页&emsp;</a></li>
		<li>|</li>
		<li><a href="/xiaomi/index.php?s=/Admin/Administrator/logout"  onClick="return confirm('您确定要退出本站?');">&emsp;退出登录&emsp;</a></li>
	</ul>
  
</header>


<div class="admin_main">
<aside class="sidebar" id="selector">
	<ul>
		<li><a href="/xiaomi/index.php?s=/Admin/Index/index" id="">后台首页</a></li>
		<li><a href="/xiaomi/index.php?s=/Admin/Goodcategory/index" id="">分类管理</a></li>
		<li><a href="/xiaomi/index.php?s=/Admin/Goodattribute/checkGoodAttribute" id="">商品属性</a></li>
		<li><a href="/xiaomi/index.php?s=/Admin/Goods/checkGoods" id="">商品管理</a></li>
		<li><a href="/xiaomi/index.php?s=/Admin/Goods/recycleIndex" id="">下架商品</a></li>
		<li><a href="/xiaomi/index.php?s=/Admin/Order/index" id="">订单管理</a></li>
		<li><a href="/xiaomi/index.php?s=/Admin/Orderdetail/index" id="">评论管理</a></li>
	<li><a href="/xiaomi/index.php?s=/Admin/User/index" id="">顾客管理</a></li>
</ul>
</aside>
<section class="admin_section">
	<div>
	<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Classify Management</title>
<link rel="stylesheet" type="text/css" href="/xiaomi/Public/css/type.css" />
<script type="text/javascript" src="/xiaomi/Public/js/admin.js"></script>

<script>
	$(function(){
		$("#statussel").change(function(){
			window.location.href = "/xiaomi/index.php?s=/Admin/Order/index/OrderStatus/" + $(this).val();
		});
	});
</script>


</head>

<body>
<br>
<br>
<table class="classify_table1">
	<tr>
		<td><span class="classify_table_title">订单管理</span> <span
			class="classify_table_button">
		<form method="post"><input type="text" placeholder="请输入订单编号"
			name="search" /> <input type="submit" value="查询"></form>
		</span></td>
	</tr>
	<tr>
		<td>
		<table class="classify_table2">
			<tr>
				<td class="classify_thead_title">订单号</td>
				<td class="classify_thead_title">顾客编号</td>
				<td class="classify_thead_title">状态筛选 <select name="OrderStatus" id="statussel"
					class="goods_select">
					<option value="0" <?php if(($status) == "0"): ?>selected<?php endif; ?>>待付款</option>
					<option value="1" <?php if(($status) == "1"): ?>selected<?php endif; ?>>待发货</option>
					<option value="2"<?php if(($status) == "2"): ?>selected<?php endif; ?>>待收货</option>
					<option value="3"<?php if(($status) == "3"): ?>selected<?php endif; ?>>待评价</option>
					<option value="4"<?php if(($status) == "4"): ?>selected<?php endif; ?>>已完成</option>
				</select></td>
				<td class="classify_thead_title">总金额</td>
				<td class="classify_thead_title">下单日期</td>
				<td class="classify_thead_title ">查看</td>
			</tr>
			
			<?php if(is_array($data)): foreach($data as $key=>$v): ?><tr>
				<td class="classify_tbody"><?php echo ($v["OrderId"]); ?></td>
				<td class="classify_tbody"><?php echo ($v["UserId"]); ?></td>
				<td class="classify_tbody">
					<?php if(($v["OrderStatus"]) == "0"): ?>待付款<?php endif; ?>
					<?php if(($v["OrderStatus"]) == "1"): ?>待发货<?php endif; ?>
					<?php if(($v["OrderStatus"]) == "2"): ?>待收货<?php endif; ?>
					<?php if(($v["OrderStatus"]) == "3"): ?>待评价<?php endif; ?>
					<?php if(($v["OrderStatus"]) == "4"): ?>已完成<?php endif; ?>
				</td>
				<td class="classify_tbody"><?php echo ($v["TotalMoney"]); ?></td>
				<td class="classify_tbody"><?php echo ($v["BuyDate"]); ?></td>
				<td>
				<button><?php if(($v["OrderStatus"]) != "1"): ?><a href="/xiaomi/index.php?s=/Admin/Order/show/OrderId/<?php echo $v['OrderId'];?>">查看</a><?php endif; ?>
				<?php if(($v["OrderStatus"]) == "1"): ?><a href="/xiaomi/index.php?s=/Admin/Order/sendGoods/OrderId/<?php echo $v['OrderId'];?>">发货</a><?php endif; ?>
				</button>
				</td>
			</tr><?php endforeach; endif; ?>


		</table>
		</td>
	</tr>
</table>
</body>
</html>
	</div>
</section>
</div>
</body>
</html>